package cn.aitrox.ry.service.anno.dao;

import cn.aitrox.ry.common.dao.BaseDao;
import cn.aitrox.ry.service.anno.entity.AnnoResultEntity;
import cn.aitrox.ry.service.anno.po.anno.result.AnnoResultQueryParamPo;
import cn.aitrox.ry.service.anno.po.anno.result.SeriesAnnoCountCountPo;
import cn.aitrox.ry.service.anno.po.task.TaskAnnoCountInfoPo;
import cn.aitrox.ry.service.anno.po.task.TaskSeriesCountPo;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface AnnoResultDao extends BaseDao<AnnoResultEntity> {
    List<TaskAnnoCountInfoPo> findAnnoCountInfoByTaskIdsStatus(List<Integer> taskIdList, Integer... status);

    List<TaskSeriesCountPo> findTaskSeriesCountByTaskIdsUserId(List<Integer> taskIds, Integer userId);

    List<SeriesAnnoCountCountPo> findSeriesAnnoCountCountByTaskIds(List<Integer> taskIds);

    String findGetableGroupId(Integer taskId, Integer userId, Integer crossNum);

    List<AnnoResultEntity> findByTaskIdUserIdGroupId(Integer taskId, Integer userId, String groupId);

    List<AnnoResultEntity> findByTaskIdGroupIdUserIdNotGtZero(Integer taskId, String groupId);

    void batchSave(List<AnnoResultEntity> list);

    Integer findGroupIdCountByTaskIdStatusUserIdGtZero(Integer taskId, Integer... status);

    List<AnnoResultEntity> findByTaskIdUserIdStatus(Integer taskId, Integer userId, Integer status);

    List<Integer> findUserIdsByTaskId(Integer taskId);

    PageInfo<AnnoResultEntity> searchByParmas(Integer page, Integer pageSize, AnnoResultQueryParamPo params);

    List<AnnoResultEntity> findByTaskIdsStatus(List<Integer> taskIds, Integer... status);

    PageInfo<AnnoResultEntity> searchUserGroupByTaskIdUserIdGroupIdOrderByStatus(Integer page, Integer pageSize, Integer userId, Integer taskId, String groupId);

    List<AnnoResultEntity> findByTaskIdUserIdGroupIds(Integer taskId, Integer userId, List<String> groupIds);

    Integer findEnGetableGroupCount(Integer taskId, Integer userId, Integer crossNum);
}
